<!-- LoginModal -->
<div class="modal fade" id="LoginModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
			</div>
			<div class="modal-body">
				<div class="sign_up_box" >
					<?php if(!$session->read('Auth.User'))
                    { ?>
					<div class="login_section">
						<?php if(!cr("Users.noRegister")){?>
						<?php echo $form->create('User', array('url'=>'/users/login/redirectBack:true','class'=>'loginForm','id'=>'loginBox'))?>
						<div class="input text required"><?php echo $form->input('email', array( 'placeholder'=>__('Email'),'label'=>'','class'=>'username_box swap_value inactiveSwap', 'error'=>false))?></div>
						<div class="input password required"><?php echo $form->input('password', array('placeholder'=>__('Password'),'label'=>'','class'=>'swap_value pass_box inactiveSwap', 'error'=>false))?></div>
						<div class="input checkbox"><?php echo $form->input('remember_me', array('type'=>'checkbox', 'class'=>'checkbox'))?></div>
						<?php echo $form->end(array('label'=>__('Login'), 'class'=>'sign_btn_2'));?>
						<?php /*echo $html->link(__('Register Now'), '/users/register',array('class'=>'reg_link')); ?><br />
						<?php echo $html->link(__('Forgot Password?'), '/users/forgotPassword',array('class'=>'forgot_link')); */
					   }
					   //@FBCONNECT INTERACTION
					   if(cr("FacebookConfig.appId")) 
					   { ?>
						<div class="fbconnect"> -----OR----<br>
							<?php echo $html->link($html->image('/img/fconnect.png'),'javascript:void(0)',array("onclick"=>"doUserFbLogin();","escape"=>false,'class'=>'facebook_button')); ?> </div>
						<?php } ?>
					</div>
					<?php  } else { ?>
					<?php $authedUser = $session->read('Auth.User');?>
					<div class="login_content">
						<div class="welcome"><?php echo __("Welcome");?>, <?php echo $authedUser['display_name'];?></div>
						<ul class="styled_list">
							<li><?php echo $html->link(__('My Account'), '/users/profile',array('class'=>'account'))."<br>";?></li>
							<li><?php echo $html->link(__('My Inbox',true),'/messages/index/inbox',array('class'=>'inbox'))."<br>";?></li>
							<li><?php echo $html->link(__('Logout'), '/users/logout',array('class'=>'logout'));?></li>
						</ul>
					</div>
					<?php } ?>
				</div>
				<!--sign_up_box--> 
				
			</div>
			<!--modal-body--> 
		</div>
		<!--modal-content--> 
	</div>
</div>
<!--LoginModal--> 
